import { getUserListAPI } from '@/api/rolesAPI'

const queryData = {
  pageNum: 1,
  pageSize: 1000,
  name: ''
}
export function isUnique(code) {
  getUserListAPI(queryData)
    .then(res => {
      const { data } = res
      const result = data.find(item => item.code === code)
      return !result
    }).catch((erro) => {
      return false
    })
}
